from django.db import models


class User(models.Model):
    """用户模型类"""
    username = models.CharField('用户名', max_length=20)
    password = models.CharField('密码', max_length=20)
    name = models.CharField('姓名', max_length=10)
    phone = models.CharField('手机号', max_length=11)
    avatarUrl = models.CharField('头像路径', max_length=150)
    email = models.CharField('邮箱', max_length=30)
    create_time = models.DateTimeField('注册时间', auto_now_add=True)

    class Meta:
        db_table = 'user'

